package com.codedancer.campus.client;

import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication(scanBasePackages = {"com.codedancer.campus.client",
    "com.codedancer.campus.common", "com.gitee.sunchenbin.mybatis.actable.manager.*"})
@MapperScan(basePackages = {
    "com.gitee.sunchenbin.mybatis.actable.dao.*",
    "com.codedancer.campus.mapper"
})
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableSwagger2Doc
@EnableSwaggerBootstrapUI
@EnableScheduling
public class StartCampusClientApplication {

  public static void main(String[] args) {
    SpringApplication.run(StartCampusClientApplication.class, args);
  }

  @Bean
  public RestTemplate restTemplate() {
    return new RestTemplate();
  }
}
